Repository navigation
Conversation
chjpooh2002
approved these changes
Nov 9, 2026
Comment on lines
+12
to
+13
| new TemplateUsage(templateCount, templateLimit, Math.max(templateLimit - templateCount, 0), | ||
| templateCount >= templateLimit), |
Contributor
There was a problem hiding this comment.
한도 도달 판단(templateCount >= templateLimit)이TemplateCommandService.validateTemplateLimit과 따로 있어요. 나중에 기준이 바뀌면 화면 표시와 실제 차단이 어긋날 수 있으니, 판단을 한 곳(예: UsageLimits나 template 쪽)에 두는 걸 고려하면 좋을 거 같습니다!
| new AiToneUsage(aiTone.usedCount(), aiTone.limit(), aiTone.remaining(), aiTone.resetAt())); | ||
| } | ||
|
|
||
| public record TemplateUsage(long count, int limit, long remaining, @JsonProperty("isFull") boolean isFull) { |
Contributor
There was a problem hiding this comment.
(사소) count, remaining이 long인데 명세 타입은 Integer예요. #68에서 totalCount를 명세에 맞춰 int로 둔 것과 맞추면 좋을 것 같습니다!
|
|
||
| /** 없거나 탈퇴한 회원이면 USER404_1. */ | ||
| public UserUsageResult getUsage(Long userId) { | ||
| if (userRepository.findByIdAndDeletedAtIsNull(userId).isEmpty()) { |
Contributor
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
관련 이슈
작업 내용
GET /api/v1/users/me/usage(명세 6번)UserUsageQueryService로 분리 (순환 참조 방지)명세와 달라진 점
USER404_1추가. #61에서getTodayUsage의 회원 확인을 빼면서 조합 서비스에서 하기로 한 내용입니다.테스트
전체
./gradlew build통과USER404_1, 토큰 없음COMMON401_1확인 체크리스트
./gradlew build통과리뷰어에게
UserController,UserSuccessCode가 겹칩니다. 나중에 병합하는 쪽에서 양쪽을 합칠 예정입니다.